package com.ivc.trade.action;

import java.util.List;

import javax.annotation.Resource;

import com.cs.framework.ui.bo.UIData;
import com.cs.framework.web.annotation.Action;
import com.cs.framework.web.annotation.Mapping;
import com.cs.framework.web.handler.Web;
import com.ivc.trade.dto.base.BuyInfoDto;
import com.ivc.trade.service.BuyInfoService;

/**
 * 进货信息
 * 
 * @author hedongzhou
 * 
 */
@Action("buyInfo")
public class BuyInfoAction {

	@Resource
	private BuyInfoService buyInfoService;

	/**
	 * 查询进货信息
	 */
	@Mapping
	public Object query() {
		BuyInfoDto buyInfoDto = Web.bind(BuyInfoDto.class);

		List<BuyInfoDto> list = buyInfoService.query(buyInfoDto);
		int count = buyInfoService.count(buyInfoDto);

		return new UIData(list, count);
	}

}
